package com.hankol.material.help;

import android.app.Activity;
import android.content.Context;

import com.alibaba.android.arouter.facade.template.IProvider;
import com.baselibrary.bean.download.DownloadInfo;

import java.util.List;

/**
 * @author zhanglijie
 * @date : 2021/05/27
 */

public interface MaterialHelp extends IProvider {
    void shareMaterial();

    /**
     * 获取搜索历史
     *
     * @param userId
     * @return
     */
    List<String> getSearchHistory(int userId);

    /**
     * 保存搜索记录
     *
     * @author: merbng
     * @time: 2021/10/18 11:26
     * @description:
     */
    void saveSearchHistory(int userId, String content);

    /**
     * 清除历史搜索
     *
     * @param userId
     */
    void cleanSearchHistory(int userId);

    /**
     * wifi是否连接
     *
     * @param context
     */
    boolean isWifiConnected(Context context);

    void hideShowKeyboard(Activity context);

    /**
     * 获取下载列表
     *
     * @param userId
     * @return
     */
    List<DownloadInfo> getDownloadList(int userId,Boolean isDownloading);

    /**
     * 保存到下载列表
     *
     * @author: merbng
     * @time: 2021/10/18 11:26
     * @description:
     */
    void saveDownload(int userId, DownloadInfo info);

    /**
     * 更新下载
     *
     * @author: merbng
     * @time: 2021/11/3 15:36
     * @description:
     */
    void updateDownload(DownloadInfo info);

    /**
     * 删除下载
     *
     * @param userId
     */
    void deleteDownload(int userId, String url);

}
